import request from '@/utils/request'

// 项目用户相关的请求地址
enum API {
  TEACHERLOGIN_URL = '/teacher/login',
  TEACHERGETSTUDENT_URL = '/teacher/GetStudent',
  TEACHERGETINFO_URL = '/teacher/GetInfo',
  ADMINUPDATEUSERAUTHORITY_URL = '/admin/updateUserAuthority',
}

// 教师登录
export const reqTeacherLogin = (data: any) =>
  request.post<any, any>(API.TEACHERLOGIN_URL, data)

// 获取学生
export const reqTeacherGetStudent = () =>
  request.get<any, any>(API.TEACHERGETSTUDENT_URL)

// 获取自身个人信息
export const reqTeacherGetInfo = () =>
  request.get<any, any>(API.TEACHERGETINFO_URL)

// 修改学生权限
export const reqUpdateUserAuthority = (data: any) =>
  request.post<any, any>(API.ADMINUPDATEUSERAUTHORITY_URL, data)
